package com.healthcloud.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.healthcloud.entity.SportGuidance;
import com.healthcloud.service.SportGuidanceService;
import com.healthcloud.utils.ApiRes;
import com.healthcloud.utils.PageParam;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 健康教育 运动指导库
 * Created by houxianghua on 2016/5/10.
 */
@ApiIgnore
@Api(value = "示例说明", description = "健康教育 运动指导库")
@RestController
@RequestMapping(value = "/app/dean/healthEducation/sportGuidance")
public class SportGuidanceApiController {

    @Autowired
    private SportGuidanceService sportGuidanceService;

    /**
     * 获取列表数据
     * @param sportGuidance
     * @param pageParam 分页数据(iDisplayStart:开始位置，iDisplayLength:返回长度)
     * @return
     */
	@ApiOperation(value = "获取列表数据",notes ="获取列表数据")
    @RequestMapping(value = "/getSportGuidance")
    public Object getSportGuidance(SportGuidance sportGuidance, PageParam pageParam) {
        List<SportGuidance> sportGuidanceList = sportGuidanceService.search(sportGuidance, pageParam);
        return new ApiRes(sportGuidanceList);
    }
}
